package com.thinkingstar.iads.common.entity;

import java.util.ArrayList;
import java.util.List;


/**
 * @ClassName: AbstractZtree
 * @Description:(Ztree顶级插件系列)
 * @author 1157372219@qq.com
 * @param <T>
 * @date 
 */
public abstract class AbstractZtreeVO<T> {
	
	/**
	 * 默认初始化顶级id
	 */
	public static final String TOP = "0001";
	
	//本级Id
	protected String id; 
	//父级菜单的 id
	protected String pId; 
	//中文名称
	protected String name; 
	//点击地址
	protected String url; 
	//是否展开
	protected boolean open; 
	//是否为父节点
	protected boolean isParent; 
	
	protected List<T> children = new ArrayList<T>();
	
	public AbstractZtreeVO() {

	}
	
	/**
	 * @param id
	 * @param pId
	 * @param name
	 */
	public AbstractZtreeVO(String id, String pId, String name) {
		super();
		this.id = id;
		this.pId = pId;
		this.name = name;
	}

	public AbstractZtreeVO(String id, String pId, String name, boolean open, boolean isParent) {
		super();
		this.id = id;
		this.pId = pId;
		this.name = name;
		this.open = open;
		this.isParent = isParent;
	}
	
	public AbstractZtreeVO(String id, String pId, String name, String url ,boolean open, boolean isParent) {
		super();
		this.id = id;
		this.pId = pId;
		this.name = name;
		this.url = url;
		this.open = open;
		this.isParent = isParent;
	}
	
	public String getId() {
		return id;
	}

	public void setId(String id) {
		this.id = id;
	}

	public String getpId() {
		return pId;
	}

	public void setpId(String pId) {
		this.pId = pId;
	}

	public String getName() {
		return name;
	}

	public void setName(String name) {
		this.name = name;
	}

	public boolean isOpen() {
		return open;
	}

	public void setOpen(boolean open) {
		this.open = open;
	}

	public boolean isParent() {
		return isParent;
	}

	public void setParent(boolean isParent) {
		this.isParent = isParent;
	}

	public String getUrl() {
		return url;
	}
	
	public void setUrl(String url) {
		this.url = url;
	}

	public static String getTop() {
		return TOP;
	}
	
	
}
